package com.weipai.springboot.module.dao;

import com.weipai.springboot.model.Admin;
import com.weipai.springboot.model.AdminLoginRecord;
import com.weipai.springboot.model.CustomerCategory;
import com.weipai.springboot.model.api.Response;

import java.util.List;
import java.util.Map;

public interface AdminDao {
    Admin getAdminByLoginName(String loginName);

    //通过邀请码验证是否有此用户
    int verifyCustomerByInviCode(String inviCode);

    int insert(Admin admin);

    List<Map<String, Object>> selectAllByDel(int del, String search, String sort, String way);

    Admin getAdminById(String id);

    Admin getAdminByCustomerId(String customerId);

    int updateByPrimaryKey22(Admin admin);

    int updateDel(String id);

    int batchDeleteById(String[] id);

    Admin getAdminByAdminCode(String adminCode);

    List<CustomerCategory> getCustomerCategoryList();

    //记录管理员登录日志
    int saveAdminLoginRecord(AdminLoginRecord adminLoginRecord);

    //管理员的登录记录列表
    List<Map<String,Object>> getAdminLoginRecordList(String adminLoginName, Integer start, Integer size, String startTime, String endTime);

    //数量
    Integer getAdminLoginRecordAmount(String adminLoginName, String startTime, String endTime);
}
